<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="新增过户" bodyClass="white-bg" libs=["prism","bootstrapSelect","ueditor"]/>
<div class="wrapper wrapper-content ibox-content">
    <@form.form id="form-transfer-add"  class="form-horizontal">
    <input  type="hidden" name="userId" value="${user.id}">
    <input  type="hidden" name="userName" value="${user.name}">
    <input  type="hidden" name="modelKey" value="${bpmTaskFrom.modelKey}">
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "申请人"/>：
    </label>
        <div class="col-sm-8"><input name="applyUserName" class="form-control" type="text" value="${user.name}" readonly="true">
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "销售员"/>：
       </label>
        <div class="col-sm-8"><input name="saleUserid" class="form-control" type="text"  readonly="true">
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "销售订单编号"/>：
       </label>
        <div class="col-sm-8"><input name="saleOrderNumber" class="form-control" type="text"  readonly="true">
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "车辆识别号"/>：
       </label>
        <div class="col-sm-8"><input name="outCarVin" class="form-control" type="text"  readonly="true">
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "车型"/>：
       </label>
        <div class="col-sm-8"><input name="outCarVehicle" class="form-control" type="text"  readonly="true">
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "特殊备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="orderSpecialRemark" class="form-control" required></textarea>
        </div>
    </div>
               
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "出纳审核"/>：</label>
        <div class="col-sm-8">
              <@form.radio name="orderCashierReview" dictType="sys_bpm_crm_passorclose" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "财务经理审核"/>：</label>
        <div class="col-sm-8">
              <@form.radio name="orderFinanceManagerReview" dictType="sys_bpm_crm_passorclose" />
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "客户ssn"/>：                               <i class="fa fa-question-circle-o" title="客户ssn"></i>                                
       </label>
        <div class="col-sm-8"><input name="orderCustomerSsn" class="form-control" type="text"  required>
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "客户I-20附件"/>：                               <i class="fa fa-question-circle-o" title="客户I-20附件"></i>                                
       </label>
        <div class="col-sm-8"><input name="orderCustomerIFilepath" class="form-control" type="text"  required>
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "注册人姓名"/>：                               <i class="fa fa-question-circle-o" title="注册人姓名"></i>                                
       </label>
        <div class="col-sm-8"><input name="orderRegistrantName" class="form-control" type="text"  required>
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "注册人地址"/>：                               <i class="fa fa-question-circle-o" title="注册人地址"></i>                                
       </label>
        <div class="col-sm-8"><input name="orderRegistrantAddress" class="form-control" type="text"  required>
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "注册人手机"/>：                               <i class="fa fa-question-circle-o" title="注册人手机"></i>                                
       </label>
        <div class="col-sm-8"><input name="orderRegistrantPhone" class="form-control" type="text"  required>
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "是否需要邮件"/>：</label>
        <div class="col-sm-8">
              <@form.radio name="orderIsNeedMail" dictType="sys_crm_isOrNo" />
        </div>
    </div>
    <div class="form-group isNeedMail">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "收件人是否同注册人"/>：</label>
        <div class="col-sm-8">
              <@form.radio name="orderRecipientisregistrant" dictType="sys_crm_isOrNo" />
        </div>
    </div>
    <div class="form-group different">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "收件人姓名"/>：
       </label>
        <div class="col-sm-8"><input name="orderRecipientName" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group different">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "收件人地址"/>：
       </label>
        <div class="col-sm-8"><input name="orderRecipientAddress" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group different">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "收件人手机"/>：
       </label>
        <div class="col-sm-8"><input name="orderRecipientPhone" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group different">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "邮件备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="orderRecipientMailMemo" class="form-control" required></textarea>
        </div>
    </div>

</@form.form>
</div>
<@footer>
    <script type="text/javascript">
        $(function () {
            if($("[name='orderIsNeedMail']")[0].checked){
                $(".isNeedMail").show();
                if($("[name='orderRecipientisregistrant']")[0].checked){
                    $(".different").hide();
                }
                else{
                    $(".different").show();
                }
            }
            else{
                $(".isNeedMail").hide();
                $(".different").hide();
            }
        })
        var prefix = baseURL + "bpm/transfer"
        $("#form-transfer-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            opt.warning("流程实例未启动，无法创建此申请单");
            return;
            if (opt.validate.form()) {
                opt.operate.save(prefix + "/add", $('#form-transfer-add').serialize());
            }
        }
        /**
         * redio 单选回调
         * @param id
         * @param data
         * @param event
         */
        function  redioCallback(id,data,event){
            if(id == "orderIsNeedMail"){
                if ($(data).is(':checked')){
                    var menuType = $(event.target).val();
                    if(menuType=="1"){
                        $(".isNeedMail").show();
                        if($("[name='orderRecipientisregistrant']")[0].checked){
                            $(".different").hide();
                        }
                        else{
                            $(".different").show();
                        }
                    }
                    else{
                        $(".different").hide();
                        $(".isNeedMail").hide();
                    }
                }
            }
            else if(id=="orderRecipientisregistrant"){
                if ($(data).is(':checked')){
                    var menuType = $(event.target).val();
                    if(menuType=="1"){
                        $(".different").hide();
                    }
                    else{
                        $(".different").show();
                    }
                }
            }
        }

</script>
</@footer>
</@pageTheme>